# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=samdump2
pkgver=3.0.0
pkgrel=5
groups=('blackarch' 'blackarch-cracker')
pkgdesc='Dump password hashes from a Windows NT/2k/XP installation.'
arch=('x86_64' 'aarch64')
url='http://sourceforge.net/projects/ophcrack/files/samdump2/'
license=('GPL')
depends=('openssl')
source=("http://downloads.sourceforge.net/ophcrack/$pkgname-$pkgver.tar.bz2"
        'prefix-infos.patch')
sha512sums=('57ff1f761e833346887ac7fdbc76e202822b306ce0a35af2a491dafc7b277836f3f113be6703c71be82828e8442e6ecd320cb88f4dcc7c5fbf7f2ca257abea95'
            '05913c001b631df693bf2a6ca8b489fca5930c5eb677863006d82f755f9a4d31790bd273822a8057b2d4ffec6f8f37f04d2e1f74350f3acdd20e592df6eacf23')

prepare() {
  cd "$pkgname-$pkgver"

  patch -p0 < "$srcdir/prefix-infos.patch"
}

package() {
  cd "$pkgname-$pkgver"

  make LIBS=-lcrypto install DESTDIR="$pkgdir"
}

